package JavaDowork.pratice3;

import java.util.Scanner;

public class Q6 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入第一个数字：");
        int a = scanner.nextInt();
        System.out.print("请输入第二个数字：");
        int b = scanner.nextInt();
        System.out.print("请输入第三个数字：");
        int c = scanner.nextInt();
        if (a > b) {
            int temp = a;
            a = b;
            b = temp;
        }
        if (a > c) {
            int temp = a;
            a = c;
            c = temp;
        }
        if (b > c) {
            int temp = b;
            b = c;
            c = temp;
        }
        System.out.println("排序后的结果：");
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
    }
}
